Digital image data containing color information is produced by various imaging systems, including video cameras, digital still cameras, document scanners and so forth. Calibration of the color data obtained from the imaging system may be required to ensure that the image that is displayed on a display device or printed in hard copy conforms to what would be seen when a human observer views the original object. Such calibration is particularly important for high quality digital camera images.
Color calibrated digital cameras allow the professional photographer to be assured that his or her images are calibrated from the time of taking the picture to the final press run. Commercial programs currently exist for color calibration of computer monitors and hardcopy output devices, but there are limited choices for calibrating digital cameras for arbitrary imaging. As will be shown below, the red, green, and blue (RGB) values a digital camera outputs are a function of the surface reflectance of the object, the spectral response of the camera, and the illumination incident on the object being imaged. Ignoring the impact of differing illuminants has been shown to increase error in the calibration. See M. Corbalan, et al., “Color Measurement in Standard Cielab Coordinates Using a 3CCD Camera: Correction for the Influence of the Light Source,” Optical Engineering, Vol. 39, No. 6, 2000, p. 1470-1476; W. W. Brown, et al., “Colorimetry Using a Standard Digital Camera,” Proc. MMS CC&D, 2001.
There are a number of ways to account for the spectrum of illumination with which images were taken . If the equipment and time are available, the illumination can be measured directly, which is the most satisfactory method, although the equipment required to measure the illuminant typically costs over $20,000. If measured values of the illuminant are not available, an illuminant can be assumed and the calibration can be performed in the same fashion as if the illuminant were measured. However, the assumed illuminant commonly will not accurately correspond to the actual illuminant, leading to incorrect colors in the final output image.
The following provides a brief introduction to color science and the measurement of color to facilitate an understanding of the invention. The standard methods and formulae laid out by the Commission Internationale de I'Eclairage (CIE) will be followed and used herein.
The amounts of red, green, and blue needed to form a particular color are referred to as the tristimulus values, X, Y, and Z. The tristimulus values X, Y, and Z of an object are calculated as follows:X=KƒS(λ)R(λ) x10(λ)dλY=KƒS(λ)R(λ) y10(λ)dλ  (1)Z=KƒS(λ)R(λ) z10(λ)dλwhere S(λ) is the relative spectral power density (SPD) of the illuminant and R(λ) is the reflectance of the surface. The color matching functions corresponding to the 1964 CIE 10° standard observer, x10, y10, and z10 are shown graphically in FIG. 1. A two-dimensional map is obtained by normalizing the magnitudes of the tristimulus values using a ratio of the X, Y, and Z values and the sum of the three values; these ratios are called the chromaticity values, x, y, and z, and are given by:x=X/(X+Y+Z)y=Y/(X+Y+Z)  (2)z=Z/(X+Y+Z)
The chromaticity chart corresponding to the CIE 1964 10° standard observer is shown in FIG. 2. The data for both the matching functions and the chromaticity coordinates are from Wyszecki and Stiles, Color Science Concepts and Methods: Quantitative Data and Formulae (book), John Wiley & Sons, New York, 2d Ed., 1982. K is chosen to force the Y value of a white reference object to have a value of 100:Ywhite=KƒS(λ)Rwhite(λ) y10(λ)dλ=100  (3)
where Rwhite(λ) is the reflectance of a standard white object, which would be unity for all λ. Solving Eq. (3) for K and substituting Rwhite (λ)=1, K is found as:K=100/ƒS(λ) y10(λ)dλ  (4)
In practical application, only discrete values of the functions can be measured, so the integrals are approximated by summations and the resulting equations are:X=KΣR(λ)S(λ) x(λ)ΔλY=KΣR(λ)S(λ) y(λ)Δλ  (5)Z=KΣR(λ)S(λ) z(λ)ΔλwhereK=100/ΣS(λ) y(λ)Δλ  (6)
Once K is calculated, the X and Z values of the white point Xn, and Zn, can be calculated with the following equations:Xn=KΣS(λ) x(λ)ΔλZn=KΣS(λ) z(λ)Δλ  (7)
To quantify color differences between standards and measured values, and to develop a standard cost function, a transformation needs to be made from XYZ coordinate space, as shown in Eq. (2), to a device independent color space. Using the CIE 1976 color space denoted by L*, a*, and b*, these transformations are:
                                                                                          L                  *                                =                                                      116                    ⁢                                                                  Y                                                  Y                          n                                                                    3                                                        -                  16                                            ,                                                                          Y                                  Y                  n                                            >              0.008856                                                                                                            a                  *                                =                                  500                  ⁡                                      [                                                                                            X                                                      X                            n                                                                          3                                            -                                                                        Y                                                      Y                            n                                                                          3                                                              ]                                                              ,                                                                          X                                  X                  n                                            >              0.008856                                                                                                            b                  *                                =                                  200                  ⁡                                      [                                                                                            Y                                                      Y                            n                                                                          3                                            -                                                                        Z                                                      Z                            n                                                                          3                                                              ]                                                              ,                                                                          Z                                  Z                  n                                            >              0.008856                                                          (        8        )            
To quantify color differences the CIE 1976 color difference equation, denoted by ΔE*ab, may be utilized as follows:ΔE*ab=[(ΔL*)2+(Δa*)2+(Δb* )2]½  (9)
where ΔL* is the difference in L* values between the standard and measured values, and Δa* and Δb* are similarly differences between standard and measured values.
For purposes of calibrating a digital camera such as a CCD (charge coupled device) camera, three linear signals, Rcamera, Gcamera, and Bcamera, can be obtained from the illuminant and the reflectance of the object. See, D. Sheffer, “Measurement and Processing of Signatures in the Visible Range Using a Calibrated Video Camera and the Camdet Software Package,” Proc. SPIE, Vol. 3062, 1997, pp. 243-253. These signals are given by:Rcamera=KrƒS(λ)R(λ)r(λ)dλ,Gcamera=KgƒS(λ)R(λ)g(λ)dλ,  (10)Bcamera=KbƒS(λ)R(λ)b(λ)dλ, 
where r(λ), g(λ), and b(λ) are the spectral response curves of the sensor in the camera and Kr, Kg, and Kb are the gains set by the white balance process. The white balance process adjusts the K values until the output signals from the CCD, R*camera, G*camera, and B*camera, are equal when imaging a white reference object. The camera output signals are nonlinear and can be represented as:R*camera=(Rcamera)γr+βr,G*camera=(Gcamera)γg+βg,  (11)B*camera=(Bcamera)γb+βb,
where γr, γg, and γb are the gamma correction factors.
Since both XYZ and Rcamera, Gcamera, and Bcamera are linear transformations of S(λ), we can write the following matrix equation:
                              (                                                                      X                  /                                      X                    n                                                                                                                        Y                  /                                      Y                    n                                                                                                                        Z                  /                                      Z                    n                                                                                )                =                  T          ⁡                      (                                                                                R                    camera                                                                                                                    G                    camera                                                                                                                    B                    camera                                                                        )                                              (        12        )            
where T is a transformation matrix. With measured values of Rcamera, Gcamera, and Bcamera and the corresponding XYZ coordinates for standard colors, determining T is simply a matter of finding the optimal solution to Eq. (12). The only obstacle left to overcome is that the camera's output signals R*camera, G*camera, and B*camera and the outputs defined in Eq. (10) are nonlinear functions of one another, implying we need a transformation between the two sets of outputs prior to finding the transformation matrix T given in Eq. (12). A relationship similar to Eq. (11) can be written for R*camera, for example, in terms of ρr, the apparent average reflectance of the red portion of the spectrum for an arbitrary color standard. The equation is given by:R*camera=(αrρr)γr+βr.  (13)
The parameters in Eq. (13), αr and γr, can be determined by measuring R*camera for a given ρr for a number of standards and then fitting Eq. 13 to the results. The response the camera would have if it were linear is:Rcamera=αrρr.  (14)
After the parameters are found we can solve Eq. (11) for Rcamera given an arbitrary R*camera. The fitting process is carried out in a similar manner for Gcamera and Bcamera for the green and blue channels.
Once the values of Rcamera, Gcamera and Bcamera have been determined for the standard colors, we need to find the transformation matrix T given by Eq. (12). To find an optimal value of T we need a cost function. Recall that for every standard panel we have the L*a*b* coordinate, and from the trial values of X/Xn, Y/Yn, and Z/Zn calculated using Eq. (12) we can find corresponding trial values L*a*b* from Eq. (9). With the trial values of the coordinates and the known L*a*b* values for each of the standard colors we use Eq. (9) to determine the error, ΔE*ab, for each panel and the cost function, C, then is given by:
                              C          =                                    ∑                              i                =                1                            N                        ⁢                          Δ              ⁢                                                          ⁢                              E                abi                *                                                    ,                            (        15        )            where N is the total number of standard colors used.
In cases where the spectral responses of the camera are significantly different from the color-matching functions, the transformation can be expanded to include square and covariance terms of the RGB channels. The expanded transformation is:
                              (                                                                      X                  /                                      X                    n                                                                                                                        Y                  /                                      Y                    n                                                                                                                        Z                  /                                      Z                    n                                                                                )                =                              T            full                    ⁡                      (                                                                                R                    camera                                                                                                                    G                    camera                                                                                                                    B                    camera                                                                                                                    R                    camera                    2                                                                                                                    G                    camera                    2                                                                                                                    B                    camera                    2                                                                                                                                          R                      camera                                        ⁢                                          G                      camera                                                                                                                                                              R                      camera                                        ⁢                                          G                      camera                                                                                                                                                              G                      camera                                        ⁢                                          B                      camera                                                                                            )                                              (        16        )            
The transformation matrix, Tfull, is now a 3×9 matrix.
It is apparent from the foregoing discussion that it is necessary to estimate or measure the illuminant incident on the color standards to accurately calibrate a digital camera. The need to measure the illuminant comes from the fact that in Eq. (6), without an estimated illuminant, S(λ), there are three times the number of spectral points in the illuminant unknowns and only three equations for each known color standard. With fewer equations than unknowns, the system is underdetermined. However, as noted above, measuring the illuminant, such as with a separate ambient illuminant sensor, raises the complexity and expense of obtaining calibrated images and is often cost prohibitive.